import json

from .views import register_handler

from flask import Blueprint, request


bp = Blueprint('user', __name__, url_prefix='/user')


@bp.route('/register', methods=('GET', 'POST'))
def register():
    params = request.get_json()
    res = register_handler(params)
    return res


@bp.route('/login', methods=['POST'])
def login():
    params = request.get_json()
    register_handler(params)
    return


@bp.route('/logout', methods=['POST'])
def logout():
    params = request.get_json()
    register_handler(params)
    return

